package com.adds.lvds.service.impl.log;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.adds.lvds.core.plugin.PageView;
import com.adds.lvds.dao.impl.log.LogMapper;
import com.adds.lvds.model.log.Log;
@Transactional
@Service("logService")
public class LogService{
	@Autowired
	private LogMapper logMapper;
	
	
	public PageView<Log> query(PageView<Log> pageView, Log t) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("paging", pageView);
		map.put("t", t);
		List<Log> list = logMapper.query(map);
		pageView.setRecords(list);
		return pageView;
	}

	
	public List<Log> queryAll(Log t) {
		// TODO Auto-generated method stub
		return logMapper.queryAll(t);
	}

	
	public void delete(String id) throws Exception {
		// TODO Auto-generated method stub
		logMapper.delete(id);

	}

	
	public void update(Log t) throws Exception {
		// TODO Auto-generated method stub
		logMapper.update(t);
	}

	
	public Log getById(String id) {
		// TODO Auto-generated method stub
		return logMapper.getById(id);
	}

	
	public void add(Log t) throws Exception {
		// TODO Auto-generated method stub
		logMapper.add(t);
	}

}
